<?php
/**
 * @author jszhang
 */

function Unload(){
	global $db;
	//release db connection
	if( isset($db) )
		$db->Disconnect();
}

// get all website in databse
function GetAllWebSiteInfo(){
	global $db, $SUPPORTED_TEMPLATE;
	$strTemplates = implode( ",", $SUPPORTED_TEMPLATE );
	$sql = "select id, name from spider_web s inner join media_type m on s.source_type=m.id where m.name in ( $SUPPORTED_TEMPLATE )";

	return $db->GetPlan( $sql );
}

?>
